package com.zcy.auth.service.impl;

import com.zcy.auth.domain.Menu;
import com.zcy.auth.mapper.MenuMapper;
import com.zcy.auth.service.IMenuService;
import com.zcy.basic.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 菜单 服务实现类
 * </p>
 *
 * @author lucker
 * @since 2023-12-03
 */
@Service
public class MenuServiceImpl extends BaseServiceImpl<Menu> implements IMenuService {

    @Autowired
    private MenuMapper menuMapper;

    @Override
    public List<Menu> queryMenuTreeByEmployeeId(Serializable id) {
        return menuMapper.queryMenuTreeByEmployeeId(id);
    }

    @Override
    public List<Menu> getTree() {
        return menuMapper.getTree();
    }

    @Override
    public List<Menu> getParentMenus(Serializable id) {
        return menuMapper.getParentMenus(id);
    }
}
